#pragma once
#include "GeometricObject.h"

class CPlane;

class CRay : public CGeometricObject
{
public:
	CRay(void);
	CRay(const CPoint3D& position, const CVector3D& dirVector);
	CRay(const CPoint3D& from, const CPoint3D& to);
	~CRay(void);

	void setPosition(const CPoint3D position);
	const CPoint3D& getPosition() const;
	void setDirection(const CVector3D dirVector);
	const CVector3D& getDirection() const;

	CRay& operator=(const CRay& ray);
	int intersects(const CPlane& plane, CPoint3D& intersectPoint);


	virtual void Draw();

private:
	void alignRayVectorOnY();

private:
	CPoint3D&		m_position;	//a point in the ray
	CVector3D		m_dirVector; //direction vector of the line
};
